/***************************************************************************
 *            iosms.c
 *
 *  dim. novembre 11 21:51:52 2012
 *  Copyright  2012  Esprit
 *  <anouar.chemek@esprit.tn>
 ****************************************************************************/
/*
 * iosms.c
 *
 * Copyright (C) 2012 - Esprit
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
#include <stdio.h>
#include "iosms.h"

int smsLenght(char sms[])
{
    int i;
    for(i=0; sms[i]!='\0'; i++);
    return i;
}

void getSms(char sms[])
{
	char current;
	int i=0;
	while((current=getchar())!='\n' && i<MAX)
	{
		sms[i]=current;
		i++;
	}
	sms[i]=0;
}

void putSms(char sms[])
{
	int i=0;
	while(sms[i]!='\0')
	{
		printf("%c",sms[i]);
		i++;
	}
}
